<template>
	<view>
		<!-- 免费入驻 -->
		<uv-popup ref="isSettle" mode="center" zIndex="19999" :close-on-click-overlay="false" round="20rpx">
			<view class="popup" style="padding: 30rpx 0;">
				<view class="popup-title center">温馨提示</view>
				<view class="popup-content">请先设置您的用户信息</view>
				<view class="popup-btn flex justify-center">
					<view class="btn2 flex justify-center" @click="confirm">确定</view>
				</view>
			</view>
		</uv-popup>
	</view>
</template>

<script setup>
	import {
		ref,
		onMounted,
	} from 'vue'
	
	const isSettle = ref(null);
	const confirm = () => {
		isSettle.value.close()
		uni.navigateTo({
			url: '/pages/member/settled'
		})
	}
	// 打开弹窗
	const openPopup = () => {
		if (isSettle.value) {
			isSettle.value.open();
		}
	};
	// 关闭弹窗
	const closePopup = () => {
		if (isSettle.value) {
			isSettle.value.close();
		}
	};
	// 暴露方法给父组件
	defineExpose({
		open: openPopup,
		close: closePopup
	});
</script>

<style lang="scss" scoped>
	.popup {
		width: 630rpx;
	
		.popup-main {
			width: 100%;
			height: 940rpx;
			background-image: url('@/static/img/popup.png');
			background-size: 100% 100%;
			padding-top: 360rpx;
			box-sizing: border-box;
	
			.popup-title {
				font-size: 48rpx;
				font-weight: bold;
			}
	
			.popup-tips {
				margin: 20rpx auto;
				font-size: 30rpx;
				font-weight: bold;
				color: #AE622E;
			}
	
			.popup-btn {
				margin: auto;
				background: linear-gradient(270deg, #261300 0%, #543209 100%);
				width: 480rpx;
				height: 90rpx;
				border-radius: 60rpx;
				color: #F5E9C9;
				font-size: 32rpx;
				font-weight: bold;
			}
		}
	
		.popup-close {
			display: flex;
			justify-content: flex-end;
			margin-bottom: 40rpx;
		}
		
		.popup-title {
			font-size: 36rpx;
			font-weight: bold;
			margin-bottom: 34rpx;
		}
		.popup-btn {
			justify-content: space-evenly;
			margin-top: 80rpx;
			view {
				width: 240rpx;
				height: 90rpx;
				border-radius: 50rpx;
				font-size: 30rpx;
				font-weight: bold;
			}
			.btn2 {
				color: #FFFFFF;
				background: linear-gradient(270deg, #39B54A 0%, #89D05F 100%);
			}
		}
	}
</style>